package game.worlds;

import hx.display.BitmapData;
import hx.display.Image;

/**
 * 玩家提示显示组件
 */
class PlayerTips extends Image {
	public var role:GameRole;

	public function new(role:GameRole, bitmapData:BitmapData):Void {
		super(bitmapData);
		this.updateEnabled = true;
		this.role = role;
		this.originX = -bitmapData.width / 2;
	}

	override function onUpdate(dt:Float) {
		super.onUpdate(dt);
		this.x = role.x;
		this.y = role.y + 10;
	}
}
